<template>
  <div class="tablebox">
    <van-action-sheet v-model="show" :title="title" @close="hadleClosed" style="height: 80%">
      <div class="content">
        <el-table size="small" :data="eltableData" border style="width: 100%" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="50"> </el-table-column>
          <el-table-column type="index" width="70" label="序号"></el-table-column>
          <el-table-column v-for="(it, in1) in tableData" :key="in1" :prop="it.key" :label="it.label" align="center">
            <!-- <template slot-scope="scope"> -->
            <!-- 处理枚举数据 -->
            <!-- <span v-if="it.key === 'RERECONNAISSANCE'">{{ scope.row.RERECONNAISSANCE == '5' ? '是' : '否' }}</span>
              <span v-else>{{ scope.row[it.key] }}</span> -->
            <!-- </template> -->
          </el-table-column>
        </el-table>
      </div>
      <div style="display: flex; justify-content: center; align-items: center">
          <van-button style="width: 80vw; margin: 20px 0" type="info" @click="hadleClosed1">确定</van-button>
        </div>
    </van-action-sheet>
  </div>
</template>

<script>
export default {
  data() {
    return {
      handleSelectionChange111: []
    }
  },
  props: {
    title: {
      type: String
    },
    show: false,
    rowData: {
      type: Object
    },
    dataguid: {
      type: String
    },
    handleSelectClose: Function,
    //所有数据
    eltableData: {
      type: Array,
      default: function () {
        return []
      }
    },
    // table的key
    tableData: {
      type: Array
    }
  },
  methods: {
    hadleClosed() {
      this.handleSelectClose()
    },
    handleSelectionChange(val) {
      this.handleSelectionChange111 = val
    },
    hadleClosed1() {
      console.log(this.handleSelectionChange111, 'this.handleSelectionChange111')
      this.$emit('hadleSelect', this.handleSelectionChange111,this.title)
      // this.hadleClosed()
    }
  },
  created() {}
}
</script>


<style lang="scss" scoped>
.tablebox{
  .content{
    height: 65vh;
    overflow-y: auto;
  
  }
}
</style>
